home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Toolbox / Visual Basic Toolbox (P.I.E.)(1996).ISO / mail / mailx6 / _setup.1 / OCXSEFIL.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-02-07  |  5.8 KB  |  195 lines

  1. VERSION 4.00
  2. Begin VB.Form SimpleForm 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Send Message with Attachment FROM Code"
  5.    ClientHeight    =   3705
  6.    ClientLeft      =   1230
  7.    ClientTop       =   1635
  8.    ClientWidth     =   6390
  9.    Height          =   4080
  10.    Left            =   1185
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   3705
  15.    ScaleWidth      =   6390
  16.    ShowInTaskbar   =   0   'False
  17.    Top             =   1305
  18.    Width           =   6480
  19.    Begin VB.TextBox szFileName 
  20.       Height          =   375
  21.       Left            =   1920
  22.       TabIndex        =   8
  23.       Top             =   2040
  24.       Width           =   4095
  25.    End
  26.    Begin VB.CommandButton Command1 
  27.       Caption         =   "Send Message without UI Interface"
  28.       Height          =   495
  29.       Left            =   240
  30.       TabIndex        =   9
  31.       Top             =   2640
  32.       Width           =   5655
  33.    End
  34.    Begin VB.TextBox szNoteText 
  35.       Height          =   375
  36.       Left            =   1920
  37.       TabIndex        =   7
  38.       Top             =   1560
  39.       Width           =   4095
  40.    End
  41.    Begin VB.TextBox szSubject 
  42.       Height          =   375
  43.       Left            =   1920
  44.       TabIndex        =   6
  45.       Top             =   1080
  46.       Width           =   4095
  47.    End
  48.    Begin VB.TextBox szAddress 
  49.       Height          =   375
  50.       Left            =   1920
  51.       TabIndex        =   3
  52.       Top             =   600
  53.       Width           =   4095
  54.    End
  55.    Begin VB.CommandButton Command2 
  56.       Caption         =   "Login cc:Mail"
  57.       Height          =   375
  58.       Left            =   120
  59.       TabIndex        =   0
  60.       Top             =   120
  61.       Width           =   1335
  62.    End
  63.    Begin Mailx16Lib.MForm MForm1 
  64.       Left            =   2160
  65.       Top             =   3270
  66.       _version        =   65541
  67.       _extentx        =   3651
  68.       _extenty        =   500
  69.       _stockprops     =   0
  70.       mxformname      =   "FormTag1"
  71.    End
  72.    Begin Mailx16Lib.MSess MSess1 
  73.       Left            =   360
  74.       Top             =   3120
  75.       _version        =   65541
  76.       _extentx        =   900
  77.       _extenty        =   900
  78.       _stockprops     =   0
  79.       mail_type       =   2
  80.    End
  81.    Begin Mailx16Lib.MMsg MMsg1 
  82.       Left            =   1365
  83.       Top             =   3120
  84.       _version        =   65541
  85.       _extentx        =   900
  86.       _extenty        =   900
  87.       _stockprops     =   0
  88.       markasread      =   0   'False
  89.       displaysenddialog=   0   'False
  90.       bindstring      =   "MSess1"
  91.    End
  92.    Begin Mailx16Lib.MReci MReci1 
  93.       Left            =   5400
  94.       Top             =   3120
  95.       _version        =   65541
  96.       _extentx        =   900
  97.       _extenty        =   900
  98.       _stockprops     =   0
  99.       bindstring      =   "MMsg1"
  100.    End
  101.    Begin Mailx16Lib.MFile MFile1 
  102.       Left            =   4440
  103.       Top             =   3120
  104.       _version        =   65541
  105.       _extentx        =   900
  106.       _extenty        =   900
  107.       _stockprops     =   0
  108.       displaydialog   =   0   'False
  109.       bindstring      =   "MMsg1"
  110.    End
  111.    Begin VB.Label Label5 
  112.       Caption         =   $"OCXSEFIL.frx":0000
  113.       Height          =   375
  114.       Left            =   120
  115.       TabIndex        =   11
  116.       Top             =   3240
  117.       Width           =   6255
  118.    End
  119.    Begin VB.Label szFile 
  120.       Caption         =   "File Name:"
  121.       Height          =   255
  122.       Left            =   240
  123.       TabIndex        =   10
  124.       Top             =   2160
  125.       Width           =   1455
  126.    End
  127.    Begin VB.Label Label4 
  128.       Caption         =   "Note Text"
  129.       Height          =   375
  130.       Left            =   240
  131.       TabIndex        =   5
  132.       Top             =   1560
  133.       Width           =   1455
  134.    End
  135.    Begin VB.Label Label3 
  136.       Caption         =   "Subject:"
  137.       Height          =   255
  138.       Left            =   240
  139.       TabIndex        =   4
  140.       Top             =   1080
  141.       Width           =   1455
  142.    End
  143.    Begin VB.Label Label2 
  144.       Caption         =   "Recipient Address:"
  145.       Height          =   255
  146.       Left            =   240
  147.       TabIndex        =   2
  148.       Top             =   600
  149.       Width           =   1575
  150.    End
  151.    Begin VB.Label Label1 
  152.       Caption         =   "This Examples SEND a ""background"" message from Your Code."
  153.       Height          =   255
  154.       Left            =   1560
  155.       TabIndex        =   1
  156.       Top             =   120
  157.       Width           =   4575
  158.    End
  159. Attribute VB_Name = "SimpleForm"
  160. Attribute VB_Creatable = False
  161. Attribute VB_Exposed = False
  162. Private Sub Command1_Click()
  163.     If MSess1.Logon = True Then
  164.         MReci1.Clear
  165.         MReci1.ResolveName = szAddress
  166.         If MReci1.ResolveName = "" Then
  167.             MsgBox "Recipient Address NOT Found"
  168.         Else
  169.             MReci1.Action = ACTION_ADDRECIPIENT
  170.             MMsg1.Action = ACTION_NEW
  171.             MMsg1.WorkingMsg = COMPOSE_MSG
  172.             MReci1.Action = ACTION_RECIP_SET
  173.             MMsg1.Subject = szSubject
  174.             MMsg1.NoteText = szNoteText
  175.             MFile1.Clear
  176.             Ret = MFile1.AddItem(szFileName.Text)
  177.             If Ret = False Then MsgBox "Error Setting File Attachment"
  178.             MFile1.Action = ACTION_FILESET
  179.             
  180.             MMsg1.Action = ACTION_SENDMSG
  181.             
  182.             If MMsg1.ErrorNum = 0 Then
  183.                 MsgBox "Message has been sent"
  184.             Else
  185.                 MsgBox "Error Sending The Mail message"
  186.             End If
  187.         End If
  188.     Else
  189.         MsgBox "No Active Session available"
  190.     End If
  191. End Sub
  192. Private Sub Command2_Click()
  193.     MSess1.Logon = True
  194. End Sub
  195.